require('./douyin/env')
require('./douyin/bdms')
t = {
    "aid": 6383,
    "pageId": 6241,
    "paths": [
        "^/webcast/",
        "^/aweme/v1/",
        "^/aweme/v2/",
        "/v1/message/send",
        "^/live/",
        "^/captcha/",
        "^/ecom/"
    ],
    "boe": false,
    "ddrt": 7
}
bdms.init(t)

xhr = new XMLHttpRequest()

xhr.onabort = function () {
    console.log('xhr aborted');
}
xhr.onerror = function (t) {
    console.log('xhr error: ', t);
}
xhr.onload = function (t) {
    console.log('xhr loaded: ', t);
}
xhr.onloadend = function () {
    console.log('xhr end');
}
xhr.onloadstart = null;
xhr.onprogress = null;
xhr.onreadystatechange = null;
xhr.ontimeout = function () {
    console.log('xhr timeout');
}
xhr.status = 0;
xhr.statusText = "";
xhr.withCredentials = true;
let secUid="MS4wLjABAAAAZCjuScSH3wdY5rk-Fuw50VH2J8Ipe3AIMOn6lzUPeps"
location = {
    "ancestorOrigins": {},
    "href": `https://www.douyin.com/user/${secUid}?from_tab_name=main`,
    "origin": "https://www.douyin.com",
    "protocol": "https:",
    "host": "www.douyin.com",
    "hostname": "www.douyin.com",
    "port": "",
    "hash": ""
}

req = 
[
    "GET",
    `/aweme/v1/web/user/profile/other/?device_platform=webapp&aid=6383&channel=channel_pc_web&publish_video_strategy_type=2&source=channel_pc_web&sec_user_id=${secUid}&personal_center_strategy=1&profile_other_record_enable=1&land_to=1&update_version_code=170400&pc_client_type=1&pc_libra_divert=Windows&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1920&screen_height=1080&browser_language=zh-CN&browser_platform=Win32&browser_name=Edge&browser_version=129.0.0.0&browser_online=true&engine_name=Blink&engine_version=129.0.0.0&os_name=Windows&os_version=10&cpu_core_num=4&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=50&webid=7425231617051018771&verifyFp=verify_m27k2ocp_P9HpZnPr_jsmh_4Un0_ANub_FQTtgmByMWbA&fp=verify_m27k2ocp_P9HpZnPr_jsmh_4Un0_ANub_FQTtgmByMWbA`,
    true
]
xhr.bdmsInvokeList = [{
    args: req,
    "func": function (t, n) {

    }
}, {
    args: [
        "Accept",
        "application/json, text/plain, */*"
    ],
    func: function () {

    }
}]

get_ab.apply(xhr, [null])